//
//  UWBrick.h
//  Urban Words
//
//  Created by Tim Brandin on 2011-12-01.
//  Copyright (c) 2011 Sypreme. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BoardPrefs.h"
#import "UWTile.h"

@interface UWBrick : NSObject {
    UIImage *image;
    UIImage *tile;
    UIImage *hoverImage;
    int x;
    int y;
    BOOL cropped;
    float alpha;
    
    CGContextRef ctx;
    BOOL firstTime;
    
    BRICK_TYPE type;
    BRICK_STATE state;
    NSString *letter;
    UWTile *placed;
    
    BOOL newtile;
    BOOL oldtile;
}

@property (assign, nonatomic) int x;
@property (assign, nonatomic) int y;
@property (assign, nonatomic) BRICK_TYPE type;
@property (assign, nonatomic) BRICK_STATE state;
@property (assign, nonatomic) NSString *letter;
@property (assign, nonatomic) CGContextRef ctx;
@property (retain, nonatomic) UWTile *placed;
@property BOOL newtile;
@property BOOL oldtile;
@property float alpha;

- (UWBrick *)initWithCGContextRef:(CGContextRef)_ctx X:(int)_x Y:(int)_y;
- (void)render:(CGRect)rect;
- (void)clear;

@end
